package hk.mrtomato.control;

import java.util.ArrayList;

import hk.mrtomato.dto.MrdateDTO;
import hk.mrtomato.help.ActionForward;
import hk.mrtomato.model.IMrBoardService;
import hk.mrtomato.model.MrBoardService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class DataListAction implements Action {

	@Override
	public ActionForward execute(HttpServletRequest request,
			HttpServletResponse response) {
		ActionForward forward = new ActionForward();
		String date = request.getParameter("date");
		System.out.println(date);
		MrBoardService service = MrBoardService.getInstance();
		ArrayList<MrdateDTO> datelist = service.dayCheckGetDate(date);
		request.setAttribute("datelist", datelist);
		forward.setUrl("datelist");
		return forward;
	}

}
